package com.lanou.dllo.findfood.adpter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.lanou.dllo.findfood.fragment.MyCookFragment;

/**
 * Created by dllo on 15/10/23.
 */
public class MenuViewPagerAdpter extends FragmentPagerAdapter{
   private  String[] titles = {"美容            ","减肥           ","健康膳食        ","甜点     "};

    public MenuViewPagerAdpter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return MyCookFragment.newInstance(position);
    }

    @Override
    public int getCount() {
        return titles.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}
